/*
   询问
   指令格式: ask <someone> about <something>
*/

inherit "inherit/object"

number main(object me,string arg){

    string *quest;
    if ( sizeof((quest = sscanf(arg,"%s about %s")))<=0  ) return 0;
    (whoId,topIc) = quest;
    object ob;
    if( !(ob = present(whoId, environment(me))) ){
        tellObject(me,"这儿没有这个人。");
        return 1;
    }

    tellObject(me,fmt("你向 %s 询问关于 %s 的事情",ob.query("name"),topIc));
    var msgVal;

    if( (msgVal = ob.query("inquiry/"+topIc)) ){
        string tStr = msgVal(me);
        tellObject(me,ob.query("name")+"说道："+tStr);
    }

    return 1;

}

